<%@ include file="/common/taglibs.jsp"%>

<title><fmt:message key="reasonDetail.title"/></title>
<content tag="heading"><fmt:message key="reasonDetail.heading"/></content>

<html:form action="saveReason" method="post" styleId="reasonForm" onsubmit="return validateReasonForm(this)">
<ul>

<html:hidden property="id"/>

    <li>
        <generalsetting:label styleClass="desc" key="reasonForm.reasonName"/>
        <html:errors property="reasonName"/>
        <html:text property="reasonName" styleId="reasonName" styleClass="text medium"/>

    </li>

    <li>
        <generalsetting:label styleClass="desc" key="reasonForm.sysId"/>
        <!-- html:errors property="sysId"/-->
        <!-- html:text property="sysId" styleId="sysId" styleClass="text medium"/-->
            <html:select property="sysId" onchange="">
            	<html:options collection="systems" property="sysId" labelProperty="sysName"/>
            </html:select>

    </li>

    <li>
        <generalsetting:label styleClass="desc" key="reasonForm.categoryId"/>
        <!-- html:errors property="categoryId"/-->
            <html:select property="categoryId" onchange="">
            	<html:options collection="categories" property="categoryId" labelProperty="categoryName"/>
            </html:select>

    </li>

    <li class="buttonBar bottom">
        <html:submit styleClass="button" property="method.save" onclick="bCancel=false">
            <fmt:message key="button.save"/>
        </html:submit>

        <html:submit styleClass="button" property="method.delete" onclick="bCancel=true; return confirmDelete('Reason')">
            <fmt:message key="button.delete"/>
        </html:submit>

        <html:cancel styleClass="button" onclick="bCancel=true">
            <fmt:message key="button.cancel"/>
        </html:cancel>
    </li>
</ul>
</html:form>

<script type="text/javascript">
    Form.focusFirstElement($("reasonForm"));
</script>

<html:javascript formName="reasonForm" cdata="false" dynamicJavascript="true" staticJavascript="false"/>
<script type="text/javascript" src="<html:rewrite page="/scripts/validator.jsp"/>"></script>
